home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / ClassDay.dxr / Internal_2_tab hotspot.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  2.4 KB  |  81 lines

  1. property spriteNum, row, fp
  2. global tableau, equal, currentsel, getlist, godlist, basecard, foundation, extras, dimpos
  3.  
  4. on beginSprite me
  5.   row = determinerow()
  6.   candd = [#one: 13, #two: 27, #three: 43, #four: 57]
  7.   fp = candd[row]
  8. end
  9.  
  10. on determinerow me
  11.   if spriteNum = 93 then
  12.     return #one
  13.   else
  14.     if spriteNum = 94 then
  15.       return #two
  16.     else
  17.       if spriteNum = 95 then
  18.         return #three
  19.       else
  20.         if spriteNum = 96 then
  21.           return #four
  22.         end if
  23.       end if
  24.     end if
  25.   end if
  26. end
  27.  
  28. on mouseEnter me
  29.   if getlist <> VOID then
  30.     if not findfound(the clickOn) then
  31.       if (tableau[row].getcardcount() < 14) and ((tableau[row].getcardcount() + extras.count) <= 14) then
  32.         if extras.count = 0 then
  33.           if (getlist.getlastcard().rankvalue = (tableau[row].getlastcard().rankvalue + 1)) and (getlist.getlastcard().suit = tableau[row].getlastcard().suit) then
  34.             equal = 1
  35.             currentsel = tableau[row].getlastcard().spnum + 1
  36.             godlist = tableau[row]
  37.           else
  38.             if getlist.getlastcard().suit = tableau[row].getlastcard().suit then
  39.               if (getlist.getlastcard().rank = "ace") and (tableau[row].getlastcard().rank = "king") then
  40.                 equal = 1
  41.                 currentsel = tableau[row].getlastcard().spnum + 1
  42.                 godlist = tableau[row]
  43.                 put getlist.cards[dimpos].rank
  44.                 put godlist.getlastcard().rank
  45.               end if
  46.             end if
  47.           end if
  48.         else
  49.           if (getlist.cards[dimpos].rankvalue = (tableau[row].getlastcard().rankvalue + 1)) and (getlist.cards[dimpos].suit = tableau[row].getlastcard().suit) then
  50.             equal = 1
  51.             currentsel = tableau[row].getlastcard().spnum + 1
  52.             godlist = tableau[row]
  53.           else
  54.             if getlist.cards[dimpos].suit = tableau[row].getlastcard().suit then
  55.               if (getlist.cards[dimpos].rank = "ace") and (tableau[row].getlastcard().rank = "king") then
  56.                 equal = 1
  57.                 currentsel = tableau[row].getlastcard().spnum + 1
  58.                 godlist = tableau[row]
  59.               end if
  60.             end if
  61.           end if
  62.         end if
  63.       end if
  64.     end if
  65.   end if
  66. end
  67.  
  68. on findfound arg
  69.   if (arg >= 77) and (arg <= 92) then
  70.     return 1
  71.   else
  72.     return 0
  73.   end if
  74. end
  75.  
  76. on mouseLeave me
  77.   equal = 0
  78.   currentsel = 0
  79.   godlist = VOID
  80. end
  81.